package com.project.mapper;

import com.project.bean.ReplyBean;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
@Mapper
public interface IReplyMapper {
    /**
     * 查询全部
     * @return 回帖对象集合
     */
    public List<ReplyBean> findById(int postId);

    /**
     * 添加回帖
     * @param reply
     */
    @Insert("INSERT INTO t_reply(r_title,r_content,fk_postId,r_user,r_time)" +
            "value(#{title},#{content},#{postBean.id},#{user},#{date})")
    public void add(ReplyBean reply);
}
